Conventionally, there is a technology of detecting an object that appears on a moving image, and it is possible to detect not only an object with a motion (hereinafter, referred to as moving object) but also an object that is still on an image (hereinafter, referred to as motionless object).
For example, in Patent Document 1, a position of an object is detected only by utilization of a difference between a short-term background image, which is generated on the basis of a short-term moving image, and an input image. Then, an invention of calculating, in a case where the moving object stops for a certain period, a position of the still object by using a difference between a long-term background image, which is generated on the basis of a long-term moving image, and an input image is described.
In the invention of Patent Document 1, it is possible to detect a moving object or a motionless object, which is still only for a short period, by using a short-term background image and to separately detect a motionless object, which is still for a long period, by using a long-term background image. However, since a moving object and a motionless object are detected separately, it is not possible to check whether the detected moving object and motionless object are the same object. Thus, for example, in a case where an object with a motion stops on an image and starts moving again after a long period, it is not possible to detect and track these as the same object.